import { Component, OnInit, OnDestroy } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { Subscription, fromEvent } from 'rxjs';
import { filter, map, mergeMap, switchMap, tap, startWith } from 'rxjs/operators';
import { I18nService } from './core/i18n/i18n.service';
import { MessageService } from './core/service';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit, OnDestroy {

  private title = '钱包';
  private titleKey: string;

  private subscriptions: Subscription[];

  

  constructor(
    private router: Router,
    private activatedRoute: ActivatedRoute,
    private titleService: Title,
    private i18nService: I18nService,
    private rxMsg : MessageService
  ) {
    this.subscriptions = [];
  };
  

  ngOnInit() {
   
  };
    
  ngOnDestroy(): void {
    if (this.subscriptions && this.subscriptions.length) {
      this.subscriptions.forEach(subscription => subscription.unsubscribe);
    }

    this.subscriptions = [];
  }
}
